package com.vanke.activiti.common.filter;

import com.vanke.activiti.constant.Constant;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
@WebFilter(filterName = "loginFilter"
,urlPatterns = "/*")
public class LoginFilter implements Filter {

    private HttpServletRequest httpServletRequest;
    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
        httpServletRequest  = (HttpServletRequest) servletRequest;
        String auth = httpServletRequest.getHeader(Constant.ACTIVITI_FILTER_LOGIN_HEADER_AUTH);


        filterChain.doFilter(servletRequest,servletResponse);
    }

    @Override
    public void destroy() {

    }
}
